<ValidateForm Model="@FooModel">
    <div class="form-inline">
        <div class="row">
            <div class="form-group col-12">
                <CheckboxList TModel="Foo" TValue="string" @bind-Value="@FooModel.Value" Items="@Items2"
                              ValueField="Value" TextField="Text" CheckedField="Checked">
                    <RequiredValidator />
                </CheckboxList>
            </div>
        </div>
        <div class="row">
            <div class="form-group col-12">
                <div class="control-label">绑定值：</div>
                <div class="form-control">@FooModel.Value</div>
            </div>
        </div>
    </div>
</ValidateForm>

@code {
    private class Model
    {
        public string Value { get; set; } = "5,8";
    }

    private Model FooModel { get; set; } = new Model();
   
    private class Foo
    {
        public string Text { get; set; } = "";

        public int Value { get; set; }

        public bool Checked { get; set; }
    }

    private IEnumerable<Foo> Items2 { get; set; } = new List<Foo>()
    {
        new Foo { Text = "Item 5", Value = 5, Checked = true },
        new Foo { Text = "Item 6", Value = 6, Checked = false },
        new Foo { Text = "Item 7", Value = 7, Checked = true },
        new Foo { Text = "Item 8", Value = 8, Checked = false }
    };
}